﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="_csrf" content="${_csrf.token}"/>  
<meta name="_csrf_header" content="${_csrf.headerName}"/>
<link href="static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="static/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
<link href="static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
<title>天使合伙人管理系统</title>
<meta name="keywords" content="天使合伙人管理系统" >
<meta name="description" content="天使合伙人管理系统" >
</head>
<body>
<input type="hidden" id="TenantId" name="TenantId" value="" />
<div class="header"></div>
<div class="loginWraper">
  <div id="loginform" class="loginBox">
    <form:form  class="form form-horizontal" name="loginForm" action="j_spring_security_check" method="post" >
      <div class="row cl">
        <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
        <div class="formControls col-xs-8">
        
        <font color="red">  
         <c:if test="${LOGIN_TIMEOUT!='' }">  
                <c:out value="${LOGIN_TIMEOUT}"/>  
         </c:if>
         <c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION}">
           <c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION.message }">
           		
           
           </c:if>
         	<c:if test="${fn:contains(SPRING_SECURITY_LAST_EXCEPTION.message, 'Bad credentials')}" >
                <c:out value="用户名或密码有误"/>  
         	</c:if>
         	<c:if test="${fn:contains(SPRING_SECURITY_LAST_EXCEPTION.message, '禁用')}" >
                <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>  
         	</c:if>
         
         </c:if>
        </font> 
          <input class="input-text size-L" type='text' name='username' id='username' placeholder="登录名" class="txtinput" value="admin" />
        </div>
      </div>
      <div class="row cl">
        <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
        <div class="formControls col-xs-8"> 
          <input class="input-text size-L" type='password' name='password' id='password' class="txtinput" placeholder="密码" value="123456" />
        </div>
      </div>
<!--       <div class="row cl">
        <div class="formControls col-xs-8 col-xs-offset-3">
          <input class="input-text size-L" type="text" placeholder="验证码" onblur="if(this.value==''){this.value='验证码:'}" onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:" style="width:150px;">
          <img src=""> <a id="kanbuq" href="javascript:;">看不清，换一张</a> </div>
      </div>
      <div class="row cl">
        <div class="formControls col-xs-8 col-xs-offset-3">
          <label for="online">
            <input type="checkbox" name="spring_security_remember_me" />
            使我保持登录状态</label>
        </div>
      </div> -->
      <div class="row cl">
        <div class="formControls col-xs-8 col-xs-offset-3">
          <input name="" type="submit" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;"/>
          <input name="" type="reset" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;"/>
        </div>
      </div>
    </form:form>
  </div>
</div>
<div class="footer">Copyright © 2016 天使合伙人 by 技术部</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>

<script>
function GetQueryString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);
     if(r!=null)return  unescape(r[2]); return null;
}
var error=GetQueryString("error");
checkError(error);
function checkError(errCode){
	switch(errCode){
		case 1:
			$('#login_input_error_info').removeClass('login_checkimg_box_err').addClass('login_checkimg_box_err');
			$("#j_code").get(0).focus();
			$('#login_input_error_info').html("验证码错误");
			break;
		case 2:
			$('#login_input_pwderror_info').removeClass('login_input_pwderror_info').addClass('login_input_pwderror_info');
			$("#j_password").get(0).focus();
			$('#login_input_pwderror_info').html("密码错误");
			break;
		case 3:
			$('#login_input_usererror_info').removeClass('login_input_usererror_info').addClass('login_input_usererror_info');
			$("#j_username").get(0).focus();
			$('#login_input_usererror_info').html("账号错误");
			break;
		default:
			break;
	}
}
</script>
</body>
</html>